package com.cncn.db;

public class LotteryResult {
	public static final String TABLE_NAME = "lottery_result";
	public static final String RESULT_ID = "result_id";
	public static final String LOTTERY_ID = "lottery_id";
	public static final String USER_ID = "user_id";
	public static final String LOTTERY_TIME = "lottery_time";
	
	
	public static String createTable() {
		StringBuffer sql = new StringBuffer("CREATE TABLE IF NOT EXISTS ");
		sql.append(TABLE_NAME + " ( ");
		sql.append(RESULT_ID+" INTEGER PRIMARY KEY, ");
		sql.append(LOTTERY_ID +" INT, ");
		sql.append(USER_ID + " INT, ");
		sql.append(LOTTERY_TIME + " DATETIME  DEFAULT (datetime(CURRENT_TIMESTAMP,'localtime')) )");
		
		return sql.toString();
	}
}
